<nav class="mui-bar mui-bar-tab">
    <a  class="mui-tab-item " id="shouye" >
        <!--<span class="mui-icon mui-icon-home imgs"></span>-->
        <span class="mui-tab-label">首页</span>
    </a>
    <a class="mui-tab-item" id="fenlei">
        <!--<span class="mui-icon mui-icon-phone imgs"></span>-->
        <span class="mui-tab-label">分类</span>
    </a>
    <!--<a class="mui-tab-item" id="gys" >-->
        <!--&lt;!&ndash;<span class="mui-icon mui-icon-email imgs"></span>&ndash;&gt;-->
        <!--<span class="mui-tab-label">供应商</span>-->
    <!--</a>-->
    <a class="mui-tab-item" id="my">
        <!--<span class="mui-icon mui-icon-gear imgs"></span>-->
        <span class="mui-tab-label">我的</span>
    </a>
</nav>
<script>
    //设置当前选项卡按钮高亮显示
    $(function(){
        var title = '{$page_title}';
        $('.mui-tab-item').each(function(){
            var text = $(this).find('span').html();
            if(text == title){
                $(this).addClass('mui-active');
            }
        })


    })

    //点击每个选项卡跳转到对应页面
    var shouye = document.getElementById('shouye');
    shouye.addEventListener('tap',function(){
        window.location.href = "{:U('Index/index')}";
    });
    var fenlei = document.getElementById('fenlei');
    fenlei.addEventListener('tap',function(){
        window.location.href = "{:U('Cat/cats')}";
    });
//    var gys = document.getElementById('gys');
//    gys.addEventListener('tap',function(){
//        window.location.href = "{:U('Gys/gys')}";
//    });
    var my = document.getElementById('my');
    my.addEventListener('tap',function(){
        window.location.href = "{:U('User/user')}";
    });
</script>